hysop.tools.field_utils module

class hysop.tools.field_utils.BasePrinter[source]

Bases: object

print_Derivative(expr)[source]
class hysop.tools.field_utils.DifferentialStringFormatter[source]

Bases: object

Utility class to format differential related strings like partial derivatives.

All string formatting function returns 4 different results:

*A string that can be used as identifier (name). *A pretty string in utf-8 (pretty_name). *A variable name that can be used as a valid C identifier for code generation (var_name). *A latex string that can be compiled and displayed with latex (latex_name).

Prefix used for methods:

b = name p = pretty_name v = var_name l = latex_name

See __main__ at the bottom of this file for usage.

comp_fns = (<function bcomp_fn>, <function <lambda>>, <function vcomp_fn>, <function lcomp_fn>)
divide_fns = (<function bdivide_fn>, <function pdivide_fn>, <function vdivide_fn>, <function ldivide_fn>)
exp_fns = (<function bexp_fn>, <function <lambda>>, <function vexp_fn>, <function lexp_fn>)
classmethod format_partial_name(bvar, pvar, vvar, lvar, bpow_fn=<function bpow_fn>, ppow_fn=<function <lambda>>, vpow_fn=<function vpow_fn>, lpow_fn=<function lpow_fn>, bcomp_fn=<function bcomp_fn>, pcomp_fn=<function <lambda>>, vcomp_fn=<function vcomp_fn>, lcomp_fn=<function lcomp_fn>, blp='(', plp='', vlp='', llp='', brp=')', prp='', vrp='', lrp='', bd='d', pd='∂', vd='d', ld='<LBRACKET>\\partial<RBRACKET>', dpow=1, varpow=1, components=None, trigp=3, fsc=True)[source]
classmethod format_partial_names(bvars, pvars, vvars, lvars, varpows, bjoin_fn=<function bjoin_fn>, pjoin_fn=<function pjoin_fn>, vjoin_fn=<function vjoin_fn>, ljoin_fn=<function ljoin_fn>, components=None, fsc=True, **kwds)[source]
classmethod format_pd(bvar, pvar, vvar, lvar, bxvars='x', pxvars='x', vxvars='x', lxvars='x', varpows=1, var_components=None, xvars_components=None, bdivide_fn=<function bdivide_fn>, pdivide_fn=<function pdivide_fn>, vdivide_fn=<function vdivide_fn>, ldivide_fn=<function ldivide_fn>, fsc=True, **kwds)[source]
static format_special_characters(ss)[source]
join_fns = (<function bjoin_fn>, <function pjoin_fn>, <function vjoin_fn>, <function ljoin_fn>)
pow_fns = (<function bpow_fn>, <function <lambda>>, <function vpow_fn>, <function lpow_fn>)
classmethod return_names(*args, **kwds)[source]
sub_fns = (<function bsub_fn>, <function <lambda>>, <function vsub_fn>, <function lsub_fn>)
class hysop.tools.field_utils.LatexNamePrinter(settings=None)[source]

Bases: BasePrinter, LatexPrinter

emptyPrinter(expr)[source]
class hysop.tools.field_utils.NamePrinter(settings=None)[source]

Bases: BasePrinter, StrReprPrinter

emptyPrinter(expr)[source]
class hysop.tools.field_utils.PrettyNamePrinter(settings=None)[source]

Bases: BasePrinter, StrPrinter

emptyPrinter(expr)[source]
class hysop.tools.field_utils.VarNamePrinter(settings=None)[source]

Bases: BasePrinter, C99CodePrinter

emptyPrinter(expr)[source]
hysop.tools.field_utils.bcomp_fn(x)[source]
hysop.tools.field_utils.bdivide_fn(x, y)[source]
hysop.tools.field_utils.bexp_fn(x)[source]
hysop.tools.field_utils.bjoin_fn(x)[source]
hysop.tools.field_utils.bpow_fn(x)[source]
hysop.tools.field_utils.bsub_fn(x)[source]
hysop.tools.field_utils.lcomp_fn(x)[source]
hysop.tools.field_utils.ldivide_fn(x, y)[source]
hysop.tools.field_utils.lexp_fn(x)[source]
hysop.tools.field_utils.ljoin_fn(x)[source]
hysop.tools.field_utils.lpow_fn(x)[source]
hysop.tools.field_utils.lsub_fn(x)[source]
hysop.tools.field_utils.pcomp_fn(x, sep=',')
hysop.tools.field_utils.pdivide_fn(x, y)[source]
hysop.tools.field_utils.pexp_fn(x, sep=',')
hysop.tools.field_utils.pjoin_fn(x)[source]
hysop.tools.field_utils.ppow_fn(x, sep=',')
hysop.tools.field_utils.print_all_names(expr)[source]
hysop.tools.field_utils.print_latex_name(expr)[source]
hysop.tools.field_utils.print_name(expr)[source]
hysop.tools.field_utils.print_pretty_name(expr)[source]
hysop.tools.field_utils.print_var_name(expr)[source]
hysop.tools.field_utils.psub_fn(x, sep=',')
hysop.tools.field_utils.to_str(*args)[source]
hysop.tools.field_utils.vcomp_fn(x)[source]
hysop.tools.field_utils.vdivide_fn(x, y)[source]
hysop.tools.field_utils.vexp_fn(x)[source]
hysop.tools.field_utils.vjoin_fn(x)[source]
hysop.tools.field_utils.vpow_fn(x)[source]
hysop.tools.field_utils.vsub_fn(x)[source]